To ensure consistency across multiple development environments, software applications are often packaged into images that include collections of objects and metadata. Images, which are read-only, contain all of the necessary objects, such as files, scripts, libraries, settings, etc., to allow them to be run as standalone executables.
An image may be instantiated by running it within a container. Containers allow images to be isolated and run separately from one another. Images are comprised of layers, with each layer containing instructions. The layers, and thus the instructions, dictate how the image is built. For example, in an image for a webmail application, a first layer might set a base operating system image from a registry, a second layer might run an update for a web server, a third layer might add a database, and so forth.
A developer may create an entirely new image, or customize an existing image by adding, removing, or changing layers as he or she sees fit. When the developer is satisfied, the image may be built using a build command to create the application, for example, a webmail application. The application may be run in a container, and multiple applications may be simultaneously run by running multiple containers. Since every instance of the application image contains its own distribution environment, the application will perform consistently even across different environments based on the same kernel. However, the cost of such consistent performance is the retrieval of large amounts of data from the registry.